<!DOCTYPE html>
<html lang="en" ng-app="myFilter">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/angular-1.3.0.js"></script>
</head>
<body>
<div ng-controller="MyCtrl">
    ==============对象属性匹配===================

    <ul>
        <!-- 对象属性匹配 -->
        <li ng-repeat="p in data | filter:{score:94,name:'demo'}" ng-class-odd="'odd'" ng-class-even="'even'">
            <span>{{$index + 1}}</span>--<span>{{p.name}}</span>--<span>{{p.age}}</span>--<span>{{p.score}}</span>
        </li>
    </ul>
    ==============自定义匹配===================
    <ul>
        <!-- 自定义复合匹配（函数） -->
        <li ng-repeat="p in data | filter:findsocre" ng-class-odd="'odd'" ng-class-even="'even'">
            <span>{{$index + 1}}</span>--<span>{{p.name}}</span>--<span>{{p.age}}</span>--<span>{{p.score}}</span>
        </li>
    </ul>
</div>
<script type="text/javascript">
    var myModule = angular.module("myFilter", []);
    myModule.controller("MyCtrl", ["$scope", function ($scope) {
        $scope.data = [
            {name: "jj", age: 26, score: 80},
            {name: "zj", age: 24, score: 54},
            {name: "demo", age: 24, score: 81},
            {name: "demo2", age: 24, score: 94}
        ];
        $scope.findsocre = function (e) {
            return e.score >= 80 && e.score < 90
        }
    }]);
</script>
</body>
</html>